package com.py.credit.entity.common;

/**
 * 返回结果
 * 
 * @author LuTang
 *
 */
public class ResultObj extends BaseObj {
	private static final long serialVersionUID = 1L;

	public static final int SUCCESS = 1000;

	public static final int ERR_1 = 1001;

	/**
	 * 业务错误
	 */
	public static final int ERR_BUSINESS = 1002;

	/**
	 * 有记录
	 */
	public static final int ERR_HAVE_COMP = 1111;

	/**
	 * 参数错误
	 */
	public static final int ERR_PARAMETER = 1003;

	/**
	 * 未登录
	 */
	public static final int ERR_NO_LOGIN = 1005;
	/**
	 * 无权限访问
	 */
	public static final int ERR_NO_AUTHORITY = 1006;
	/**
	 * 未知错误
	 */
	public static final int ERR_NOKNOW = 1004;

	private int code;

	private String mess;

	public ResultObj(int code) {
		this.code = code;
		if (1000 == this.code) {
			this.mess = "成功";
		}
	}

	public ResultObj(int code, String mess) {
		super();
		this.code = code;
		this.mess = mess;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMess() {
		return mess;
	}

	public void setMess(String mess) {
		this.mess = mess;
	}
}
